#include "AILineSelectorAlgMin.h"
#include "../DrawingElements/Cell.h"
#include <QtAlgorithms>

AILineSelectorAlgMin::AILineSelectorAlgMin(DotController *pController, QObject *parent) :
    AILineSelector(pController, parent)
{
}

void AILineSelectorAlgMin::sort(QList<Cell *> &cells)
{
    qSort(cells.begin(),cells.end(),AILineSelectorAlgMin::compare);
}

bool AILineSelectorAlgMin::compare(Cell *pCell1, Cell *pCell2)
{
    return pCell1->lineAddedCount() > pCell2->lineAddedCount();
}
